var mongoose  = require('mongoose');
mongoose.Promise = global.Promise;
var Schema    = mongoose.Schema;

var LogSchema = new Schema({
    user:{type: String},
    content:{type: String},
    day:{type: Date, default:Date.now},
    duration:{type: Number}, //小时
    labels:[{type:String}],
    timerange:[{type:Date}],
    create_at: { type: Date, default: Date.now },
    update_at: { type: Date, default: Date.now }
});

module.exports = mongoose.model('Log', LogSchema);
